package com.ccqlk.attendance.model;

import java.sql.Time;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.persistence.Transient;

import com.alibaba.fastjson.annotation.JSONField;

@Entity
@Table(name="attendance_log")
public class AttendanceLog extends DateModel {
	private static final long serialVersionUID = 1L;

	@Id
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	private Integer id;

	@Temporal(TemporalType.DATE)
	@Column(name="a_date")
	private Date aDate;

	@Column(name="a_time")
	private Time aTime;

	@Column(name="a_type")
	private byte aType;

	@Column(name="device_code")
	private String deviceCode;

	@Column(name="staff_code")
	private String staffCode;
	
	private String userCode;
	
	private String address;
	
	private String longitude;
	
	private String latitude;
	
	
	@Transient
	private Staff staff;

	public AttendanceLog() {
	}

	public Integer getId() {
		return this.id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	@JSONField(format="yyyy-MM-dd")
	public Date getADate() {
		return this.aDate;
	}

	public void setADate(Date aDate) {
		this.aDate = aDate;
	}

	@JSONField(format="HH:mm:ss")
	public Time getATime() {
		return this.aTime;
	}

	public void setATime(Time aTime) {
		this.aTime = aTime;
	}

	public byte getAType() {
		return this.aType;
	}

	public void setAType(byte aType) {
		this.aType = aType;
	}

	public String getStaffCode() {
		return this.staffCode;
	}

	public void setStaffCode(String staffCode) {
		this.staffCode = staffCode;
	}

	public Staff getStaff() {
		return staff;
	}

	public void setStaff(Staff staff) {
		this.staff = staff;
	}

	public String getDeviceCode() {
		return deviceCode;
	}

	public void setDeviceCode(String deviceCode) {
		this.deviceCode = deviceCode;
	}

	public String getLongitude() {
		return longitude;
	}

	public void setLongitude(String longitude) {
		this.longitude = longitude;
	}

	public String getLatitude() {
		return latitude;
	}

	public void setLatitude(String latitude) {
		this.latitude = latitude;
	}

	public String getAddress() {
		return address;
	}

	public void setAddress(String address) {
		this.address = address;
	}

	public String getUserCode() {
		return userCode;
	}

	public void setUserCode(String userCode) {
		this.userCode = userCode;
	}
	
	
}